#pragma once

#include <chrono>
#include <ctime>
#include <string>

// Time translation
struct Time {
	Time() {};
	Time(long long i) : value(i) {}
	~Time() {}

	long long asSeconds();
	long long asMilliseconds();
	long long asMicroseconds();
	long long asNanoseconds();

private:
	// Time value
	long long value{0};
};

// A simple clock
struct Clock {
	// The clock start at construction
	Clock();
	~Clock() {}

	// Return time elapsed even when the clock restart
	Time restart();

	// Get the time elapsed between the construction/last restart call
	// and now
	Time getElapsedTime();

private:
	// Last time point registered
	std::chrono::steady_clock::time_point m_lastTP;
};

// Return time as "day/month/year"
std::string getDate();

// Return time as "hour:minute:second"
std::tm * getTime();